<div class="page-header">
	<%= link_to "<i class='icon-plus icon-white'></i>&nbsp;New campaign".html_safe, new_campaign_url, :class => "btn btn-primary" %>
	<h1>Campaigns</h1>
</div><!-- eo .page-header -->

<table class="table table-striped">
	<thead>
		<tr>
			<th scope="col" width="15%">Campaign ID</th>
			<th scope="col" width="30%">Name</th>
			<th scope="col" width="17%">Start date</th>
			<th scope="col" width="17%">End date</th>
			<th scope="col" width="15%">Spend amount</th>
			<th scope="col" width="6%">Visits</th>
		</tr>
	</thead>
	<tbody>
	<% @campaigns.each do |campaign| %>
		<tr>
			<td><%= campaign.id %></td>
			<td><%= link_to "#{campaign.name}", campaign_url(campaign.id) %></td>
			<td><%= campaign.start_date.strftime("%d %B %Y") %></td>
			<td><%= campaign.end_date.strftime("%d %B %Y") %></td>
			<td><%= Touchstone.currency %><%= sprintf("%.2f", campaign.spend_amount) %></td>
			<td><%= campaign.campaign_signups.count %></td>
		</tr>
	<% end %>
	</tbody>
</table>